﻿@model AgileZen.Models.Phases

@{
    ViewBag.Title = "Roles";
}

<h2>Index</h2>

@Html.ActionLink("Add", "Add", "Phase", new { projectId = Int32.Parse(Request.QueryString["projectid"]) }, null)
@Html.ActionLink("Reorder", "Reorder", "Phase", new { id = Int32.Parse(Request.QueryString["projectid"]) }, null)

<table>
    <tr>
        <td></td>
        <td>Name</td>
        <td></td>
    </tr>
@foreach (var phase in Model.Items)
{ 
    <tr>
        <td>@Html.ActionLink("Edit", "Edit", "Phase", new { id = phase.Id, projectId = Int32.Parse(Request.QueryString["projectid"]) }, null)</td>
        <td>@Html.ActionLink(phase.Name, "Details", "Phase", new { id = phase.Id, projectId = Int32.Parse(Request.QueryString["projectid"]) }, null)</td>
        <td>@Html.ActionLink("Delete", "Delete", "Phase", new { id = phase.Id, projectId = Int32.Parse(Request.QueryString["projectid"]) }, null)</td>
    </tr>
}
</table>

